package com.yst.system.domain;

import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.*;
import com.yst.common.annotation.Excels;
import com.yst.common.core.domain.entity.SysDept;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.yst.common.annotation.Excel;
import com.yst.common.core.domain.BaseEntity;

/**
 * 订单信息对象 sell_order
 * 
 * @author hoj
 * @date 2024-05-10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sell_order")
public class SellOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 销售订单id */
    @TableId(value = "sell_order_id",type = IdType.AUTO)
    private Long sellOrderId;

    /** 销售订单编号 */
    @Excel(name = "销售订单编号")
    @TableField("order_no")
    private String orderNo;

    /** 销售订单编号 */
    @Excel(name = "总价")
    @TableField("total_price")
    private BigDecimal totalPrice;

    /** 销售订单编号 */
    @Excel(name = "成交价")
    @TableField("transaction_price")
    private BigDecimal transactionPrice;


    /** 定金 */
    @Excel(name = "定金")
    @TableField("actually_paid")
    private BigDecimal actuallyPaid;

    /** 尾款 */
    @Excel(name = "尾款")
    @TableField("final_payment")
    private BigDecimal finalPayment;


    /** 客户姓名 */
    @Excel(name = "客户姓名")
    @TableField("customer_name")
    private String customerName;

    /** 客户电话 */
    @Excel(name = "客户电话")
    @TableField("customer_phone")
    private String customerPhone;

    /** 客户地址 */
    @Excel(name = "客户地址")
    @TableField("customer_address")
    private String customerAddress;

    /** 货运方式 */
    @Excel(name = "货运方式")
    @TableField("freight_type")
    private String freightType;

    /** 结款方式 */
    @Excel(name = "结款方式")
    @TableField("pay_type")
    private String payType;

    /** 订单日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("order_date")
    private Date orderDate;

    /** 出货日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出货日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("shipment_date")
    private Date shipmentDate;

    /** 订单状态（0正常 1停用） */
    @Excel(name = "订单状态", readConverterExp = "0=正常,1=停用")
    @TableField("status")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    @TableLogic(value = "0",delval = "1")
    @TableField("del_flag")
    private String delFlag;

    /** 门店id */
    @TableField("dept_id")
    private Long deptId;

    /** 门店id */
    @TableField(exist = false)
    private String deptName;

    /** 订单详情信息 */
    @TableField(exist = false)
    private List<SellOrderDetail> sellOrderDetailList;

    /** 部门 */
    @TableField(exist = false)
    private SysDept dept;

}
